package com.webex.ta.hydra.gui.table;

import com.webex.ta.hydra.gui.action.KeyStrokes;

import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;


/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-9-16
 * Time: 17:03:34
 */
public class HydraTableKeyHandler extends KeyAdapter {

    private HydraTable table;

    public HydraTableKeyHandler(HydraTable table) {
        this.table = table;
    }

    public void keyPressed(KeyEvent e) {
//        if (KeyStrokes.matches(e,KeyStrokes.UNDO)) {
//            try {
//                table.undo();
//            } catch (CannotUndoException e1) { }
//        } else if (KeyStrokes.matches(e, KeyStrokes.REDO)) {
//            try {
//                table.redo();
//            } catch (CannotRedoException e1) { }
//        }
    }

    public void keyTyped(KeyEvent e) {

    }

    public void keyReleased(KeyEvent e) {

    }
}
